
const constState = {
  roleType: {
    1: '超级管理员',
    2: '管理员',
    3: '普通用户'
  },
  userState: {
    0: '禁用',
    1: '启用'
  },
  articleState: {
    0: '待发布',
    1: '已发布'
  },
  loading: false
}
function stateReducer(state = constState, action) {
  switch (action.type) {
    case 'setLoading':
      return {...state, loading: action.data}
    default:
      return state;
  }
}

export default stateReducer